home *** CD-ROM | disk | FTP | other *** search
/ 3D Game Programming All in One / 3D Game Programming All in One Disc.iso / 3D2E / RESOURCES / CH5 / EMAGA5 / common / server / kickban.cs < prev    next >
Text File  |  2005-11-23  |  891b  |  25 lines

  1. //-----------------------------------------------------------------------------
  2. // Torque Game Engine 
  3. // Copyright (C) GarageGames.com, Inc.
  4. //-----------------------------------------------------------------------------
  5.  
  6. //-----------------------------------------------------------------------------
  7.  
  8. function kick(%client)
  9. {
  10.    messageAll( 'MsgAdminForce', '\c2The Admin has kicked %1.', %client.name);
  11.  
  12.    if (!%client.isAIControlled())
  13.       BanList::add(%client.guid, %client.getAddress(), $Pref::Server::KickBanTime);
  14.    %client.delete("You have been kicked from this server");
  15. }
  16.  
  17. function ban(%client)
  18. {
  19.    messageAll('MsgAdminForce', '\c2The Admin has banned %1.', %client.name);
  20.  
  21.    if (!%client.isAIControlled())
  22.       BanList::add(%client.guid, %client.getAddress(), $Pref::Server::BanTime);
  23.    %client.delete("You have been banned from this server");
  24. }
  25.